toOption

fun toOption(): Option<R>

Returns a Some containing the Right value if it exists, or a None if this is a Left.

Return

a Some containing the Right value if it exists, or a None if this is a Left.